package com.kingsoft.demo.Observer;

import java.util.Observable;
import java.util.Observer;

/**
 * 
 * @author kbl
 *
 */
public class Watcher implements Observer{

	@Override
	public void update(Observable o, Object arg) {
		
		
		 Watched wathed = (Watched)o; 
	     String previousData = (String)arg; 
	      System.out.print("Prievious:" + previousData + ","); 
	      System.out.println("Changed:" + wathed.retrieveData()); 
	}

}
